//package com.coolbi.onsupai.core.test;
//
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map;
//
//import org.apache.log4j.Logger;
//import org.junit.Test;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.test.context.ContextConfiguration;
//import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
//
//import com.coolbi.onsupai.core.biz.InvoiceBiz;
//import com.coolbi.onsupai.core.entity.Invoice;
//
//@ContextConfiguration(locations = { "classpath*:/spring/applicationContext*.xml" })
//public class InvoiceTestCase extends AbstractJUnit4SpringContextTests {
//
//	private static final Logger log = Logger.getLogger(InvoiceTestCase.class);
//	
//	@Autowired
//	private InvoiceBiz invoiceBiz;
//	public void setInvoiceBiz(InvoiceBiz invoiceBiz) {
//		this.invoiceBiz = invoiceBiz;
//	}
//	
////	@Test
////	public void testSave() throws Exception {
////		Invoice invoice = new Invoice();
////		invoice.setInvoiceTitle("Mr. Shi");
////		invoice.setInvoiceContent("test!");
////		invoice.setUserName("Ling");
////		invoiceBiz.save(invoice);
////		log.debug("invoice.id---------->" + invoice.getId());
////	}
//	
//	@Test
//	public void testDelete() throws Exception {
//		invoiceBiz.delete(1L);
//	}
//	
//	@Test
//	public void testUpdate() throws Exception {
//		Invoice invoice = new Invoice();
//		invoice.setInvoiceNo("2234567");
//		invoice.setId(7L);
//		invoiceBiz.update(invoice);
//	}
//	
//	@Test
//	public void testGet() throws Exception {
//		log.debug("invoice.userName--------->" + invoiceBiz.get(2).getUserName());
//	}
//	
//	@Test
//	public void testList() throws Exception {
//		List<Invoice> list = invoiceBiz.list();
//		log.debug("list.size------------>" + list.size());
//	}
//	
//	@Test
//	public void testListByPage() throws Exception {
//		List<Invoice> list = invoiceBiz.listByPage(0, 5);
//		log.debug("list.size------------>" + list.size());
//	}
//	
//	@Test
//	public void testListByParameter() throws Exception {
//		Map<String, Object> parameter = new HashMap<String, Object>();
//		parameter.put("userName", "JAVA");
//		List<Invoice> list = invoiceBiz.find(parameter);
//		log.debug("list.size------------>" + list.size());
//	}
//	
//	@Test
//	public void testListByParameterPage() throws Exception {
//		Map<String, Object> parameter = new HashMap<String, Object>();
//		parameter.put("userName", "JAVA");
//		List<Invoice> list = invoiceBiz.findByPage(parameter, 0, 2);
//		log.debug("list.size------------>" + list.size());
//	}
//	
//	@Test
//	public void testSearch() throws Exception {
//		Map<String, Object> parameter = new HashMap<String, Object>();
//		parameter.put("invoiceTitle", "Mr");
//		List<Invoice> list = invoiceBiz.search(parameter, 0, 2);
//		log.debug("list.size------------>" + list.size());
//	}
//}
